package com.itheima.app;

import com.itheima.dao.ClazzDao;
import com.itheima.dao.OrderDao;
import com.itheima.service.StudentService;
import com.itheima.service.TeacherService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");

        StudentService S = (StudentService)ctx.getBean("studentService");
        S.save();

        TeacherService T = (TeacherService)ctx.getBean("teacherService");
        T.save();

        OrderDao D = (OrderDao)ctx.getBean("orderDao");
        D.save();

        ClazzDao C = (ClazzDao)ctx.getBean("sss");
        C.save();
    }
}
